$(function() {

    //设置列表显示和隐藏
    $(".huiyi-type-form,.people-num-form,.huiyi-time-form,.huiyi-bug-form").hover(function() {
        $(this).find(".select-list").css("display", "block");
    }, function() {
        $(this).find(".select-list").css("display", "none");

    });

    //鼠标悬停在li上面的效果
    $(this).find(".select-list li").mouseover(function() {
        $(this).css("backgroundColor", "#d0eaff").siblings().css("backgroundColor", "#fff");
    })

    //选中li设置p的值    
    $(this).find(".select-list li").click(function() {
        var txt = $(this).text();
        $(this).parent(".select-list").siblings("p").html(txt);
        $(this).parent(".select-list").css("display", "none")

    })

    //获取焦点
    $(".subk input").focus(function() {
            $(this).css({
                "border": "2px solid #000",
                "border-radius": "3px"
            });

        })
        //失去焦点
    $(".subk input").blur(function() {
        $(this).css({
            "border": "1px solid #333"
        });
    })

    //勾选复选框
    $(".check .check-box").click(function() {
        var flag = $(this).attr("check");
        if (flag == undefined) {
            $(this).css({
                "background-image": "url(../images/common/newzh.png)",
                "background-position": "-356px 3px",
                "background-repeat": "no-repeat"
            })
            $(this).attr("check", "true");

        } else {
            $(this).css({
                "background-image": "",
                "background-position": "",
                "background-repeat": ""
            })
            $(this).removeAttr("check");
        }

    })

})